package ac.il.technion.cs236369.hw5.core.servlets.orders;

import java.io.Serializable;

public class OrderOutputItem implements Serializable {

	private static final long serialVersionUID = -6680997140229819075L;
	
	private int orderId;
	
	private String 	date;
	
	private String 	itemType;
	
	private String 	itemDescription;
	
	private int		startSlot;
	
	private int		slotsCount;
	
	private int		timeUnit;
	
	private double  usagePrice;
	
	private double	total;
	
	private String userId;
	
	private String projectName;
	
	public OrderOutputItem( ) {
		
	}
	
	public OrderOutputItem( String date, String projectName, String itemType, String desc, int startSlot, int slotsCount, int timeUnit, double price, String userId) {
		this.projectName = projectName;
		this.date = date;
		this.itemType = itemType;
		this.itemDescription = desc;
		this.startSlot = startSlot;
		this.slotsCount = slotsCount;
		this.timeUnit = timeUnit;
		this.usagePrice = price;
		this.total = price * slotsCount;
		this.userId = userId;
	}
	
	public String getProjectName( ) {
		return projectName;
	}

	public void setProjectName( String projectName) {
		this.projectName = projectName;
	}

	public String getDate( ) {
		return date;
	}
	public void setDate( String date) {
		this.date = date;
	}
	public String getItemType( ) {
		return itemType;
	}
	public void setItemType( String itemType) {
		this.itemType = itemType;
	}
	public String getItemDescription( ) {
		return itemDescription;
	}
	public void setItemDescription( String itemDescription) {
		this.itemDescription = itemDescription;
	}
	public int getStartSlot( ) {
		return startSlot;
	}
	public void setStartSlot( int startSlot) {
		this.startSlot = startSlot;
	}
	public int getSlotsCount( ) {
		return slotsCount;
	}
	public void setSlotsCount( int slotsCount) {
		total = usagePrice * slotsCount;
		this.slotsCount = slotsCount;
	}
	public int getTimeUnit( ) {
		return timeUnit;
	}
	public void setTimeUnit( int timeUnit) {
		this.timeUnit = timeUnit;
	}
	public double getUsagePrice( ) {
		return usagePrice;
	}
	public void setUsagePrice( double usagePrice) {
		total = usagePrice * slotsCount;
		this.usagePrice = usagePrice;
	}
	public double getTotal( ) {
		return usagePrice * slotsCount;
	}

	public String getUserId( ) {
		return userId;
	}

	public void setUserId( String userId) {
		this.userId = userId;
	}

	public int getOrderId( ) {
		return orderId;
	}

	public void setOrderId( int orderId) {
		this.orderId = orderId;
	}
	
}
